/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package org.marcelo.agro.actions;

import java.awt.event.ActionEvent;
import java.awt.event.ActionListener;
import org.netbeans.api.actions.Editable;
import org.openide.awt.ActionRegistration;
import org.openide.awt.ActionReference;
import org.openide.awt.ActionReferences;
import org.openide.awt.ActionID;

@ActionID(
        category = "Nodes",
        id = "org.marcelo.agro.actions.EditAction"
        
        )

@ActionRegistration(displayName = "#CTL_EditAction",
        iconBase = "org/marcelo/agro/recursos/Edit_24x24.png"
        )

@ActionReferences({
    @ActionReference(path = "Menu/Edit", position = 1300) ,
    @ActionReference(path = "Shortcuts", name = "F2")
        
})

public final class EditAction implements ActionListener {
    private final Editable context;

    public EditAction(Editable context) {
        this.context = context;
    }
    
    
    @Override
    public void actionPerformed(ActionEvent e) {
        // TODO implement action body
        context.edit();
    }
}
